package com.example.leepong.Game.Stage;

/**
 * Created by Ichigo on 24/05/2014.
 */
public class BallConfiguration {

    public static final float REFERENCE_BASE_MOVE_RATIO = 0.6f;
    public static final float REFERENCE_NORMALIZE_RATIO = 1.2f;

    public static final int NORMAL = 1;
    public static final int NORMAL_GLUEY = 2;
    public static final int NORMAL_DRY = 3;
    public static final int FASTBASE = 10;
    public static final int FASTBASE_GLUEY = 11;
    public static final int FASTBASE_DRY = 12;

    public float BaseMoveStepRatio;
    public float NormalizeToDefaultRatio;

    public static BallConfiguration getConfiguration(int configId) {
        BallConfiguration config = new BallConfiguration();
        if (configId == NORMAL) {
            config.BaseMoveStepRatio = REFERENCE_BASE_MOVE_RATIO;
            config.NormalizeToDefaultRatio = REFERENCE_NORMALIZE_RATIO;
        } else if (configId == NORMAL_GLUEY) {
            config.BaseMoveStepRatio = REFERENCE_BASE_MOVE_RATIO;
            config.NormalizeToDefaultRatio = REFERENCE_NORMALIZE_RATIO * 1.1f;
        } else if (configId == NORMAL_DRY) {
            config.BaseMoveStepRatio = REFERENCE_BASE_MOVE_RATIO;
            config.NormalizeToDefaultRatio = REFERENCE_NORMALIZE_RATIO * 0.9f;
        } else if (configId == FASTBASE) {
            config.BaseMoveStepRatio = REFERENCE_BASE_MOVE_RATIO * 1.1f;
            config.NormalizeToDefaultRatio = REFERENCE_NORMALIZE_RATIO;
        } else if (configId == FASTBASE_GLUEY) {
            config.BaseMoveStepRatio = REFERENCE_BASE_MOVE_RATIO * 1.1f;
            config.NormalizeToDefaultRatio = REFERENCE_NORMALIZE_RATIO * 1.1f;
        } else if (configId == FASTBASE_DRY) {
            config.BaseMoveStepRatio = REFERENCE_BASE_MOVE_RATIO * 1.1f;
            config.NormalizeToDefaultRatio = REFERENCE_NORMALIZE_RATIO * 0.9f;
        } else {
            return null;
        }
        return config;
    }
}
